package com.uk.ui.tarifa;

import com.vaadin.event.ItemClickEvent.ItemClickListener;
import com.vaadin.ui.Tree;

public class TarifaNavigationTree extends Tree {

	public static final Object LIST = "Listo tarifat";
	public static final Object ADD = "Shto tarife";
	
	public static final Object AKTIVE = "Aktive";
	public static final Object JOAKTIVE = "Jo Aktive";
	
	
	public TarifaNavigationTree(TarifaPanel tarifaPanel) {
		super();
		addItem(LIST);
	
		addItem(ADD);
		
		
		//setChildrenAllowed(LIST, false);
		setChildrenAllowed(ADD, false);
		
		this.addItem(AKTIVE);
		this.setParent(AKTIVE, TarifaNavigationTree.LIST);
		this.setChildrenAllowed(TarifaNavigationTree.AKTIVE, false);
		this.setValue(AKTIVE);
		
		this.addItem(JOAKTIVE);
		this.setParent(JOAKTIVE, TarifaNavigationTree.LIST);
		this.setChildrenAllowed(TarifaNavigationTree.JOAKTIVE, false);
		
		this.expandItem(TarifaNavigationTree.LIST);
		setSelectable(true);
		setNullSelectionAllowed(false);
		this.addListener((ItemClickListener)tarifaPanel);
	}
	
	
	
	
}
